#include <iostream> // 用于cout
#include <list>     // 用于list容器
#include <algorithm>// 用于find和reverse函数
using namespace std;
int main()

{

	int ar[] = { 0,1, 2, 3, 4,  5, 6, 7, 8, 9 };

	int n = sizeof(ar) / sizeof(int);

	list<int> mylist(ar, ar+n); 

	list<int>::iterator pos = find(mylist.begin(), mylist.end(), 5);

	reverse(mylist.begin(), pos);

	reverse(pos, mylist.end());

	list<int>::const_reverse_iterator crit = mylist.crbegin();

	while(crit != mylist.crend())

	{

		cout<<*crit<<" ";

		++crit;

	}

	cout<<endl;

}